#ifndef DATE_H
#define DATE_H


class Date
{
public:
	Date();
	Date(const Date& rhs);
	~Date();

	unsigned int Year() const { return year; }
	unsigned int Month() const { return month; }
	unsigned int Day() const { return day; }
	unsigned int Hour() const { return hour; }
	unsigned int Minute() const { return minute; }
	unsigned int Second() const { return second; }

	void SetYear(unsigned int val) { year = val; }
	void SetMonth(unsigned int val) { CheckRange(val, 1, 12); month = val; }
	void SetDay(unsigned int val) { CheckRange(val, 1, 31); day = val; }
	void SetHour(unsigned int val) { CheckRange(val, 0, 23); hour = val; }
	void SetMinute(unsigned int val) { CheckRange(val, 0, 59); minute = val; }
	void SetSecond(unsigned int val) { CheckRange(val, 0, 59); second = val; }

	const char *MonthString() const;

protected:

private:
	unsigned int year, month, day, hour, minute, second;

	void CheckRange(int val, int min, int max);

};

#endif //DATE_H
